<?php
class support{
	private $id;
	private $title;
	private $yahoo;
	private $skype;
	private $g_id;
	// set get id
	public function setid($id) {
		$this->id = $id;
	}
	public function getid() {
		return $this->id;
	}
	// set get title
	public function settitle($title) {
		$this->title = $title;
	}
	public function gettitle() {
		return $this->title;
	}
	// 	set get yahoo
	public function setyahoo($yahoo) {
		$this->yahoo = $yahoo;
	}
	public function getyahoo() {
		return $this->yahoo;
	}
	// 	set get skype
	public function setskype($skype) {
		$this->skype = $skype;
	}
	public function getskype() {
		return $this->skype;
	}
	// 	set get skype
	public function setg_id($g_id) {
		$this->g_id = $g_id;
	}
	public function getg_id() {
		return $this->g_id;
	}
	
	public function listall() {
		GLOBAL $db;
		$sql = "SELECT * FROM " . $db->tbl_fix . "support";
		$result = $db->executeQuery ( $sql );
		while ( $rows = mysql_fetch_array ( $result ) ) {
			$return [] = $rows;
		}
		return $return;
	}
	public function listbygroup() {
		GLOBAL $db;
		$sql = "SELECT * FROM " . $db->tbl_fix . "support where g_id='".$this->getg_id()."'";
		$result = $db->executeQuery ( $sql );
		while ( $rows = mysql_fetch_array ( $result ) ) {
			$return [] = $rows;
		}
		return $return;
	}
}
$support = new support();
?>